package com.miracle.service.impl;

import com.miracle.dao.UserDAO;
import com.miracle.entity.Perms;
import com.miracle.entity.User;
import com.miracle.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jie.xi
 * @date 2022年04月21日 14:28
 */

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDAO userDAO;

    @Override
    public User getUser(String username) {
        return userDAO.getUser(username);
    }

    public User findRolesByUserName(String username) {
        return userDAO.findRolesByUserName(username);
    }

    @Override
    public List<Perms> findPermsByRoleId(String id) {
        return userDAO.findPermsByRoleId(id);
    }
}
